package com.czh.gzskzn.qqkonjian.Fragment;


import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.czh.gzskzn.qqkonjian.Activity.DakaActivity;
import com.czh.gzskzn.qqkonjian.Activity.QinJiaActivity;
import com.czh.gzskzn.qqkonjian.R;

/**
 * Created by gzsk on 2017/5/9.
 * name  陈忠红
 * email czhhx15599109256@163.com
 */

public class FragmentYinYon extends Fragment implements View.OnClickListener{

    private View view;

//    图片

    private ImageView daKa,qinJia,chuChai,waiChu,jiaBao,riBao,zhonBao,yuBao,riZhiGuanLi,wuPinLingQu;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.yingyin_fragmwnt, container, false);
        intiView();



        return view ;
    }

    private void intiView() {

        daKa = (ImageView) view.findViewById(R.id.im_yinyon_daka);
        qinJia = (ImageView) view.findViewById(R.id.im_yinyon_qinjia);
        chuChai = (ImageView) view.findViewById(R.id.im_yinyon_chuchai);
        waiChu = (ImageView) view.findViewById(R.id.im_yinyon_waichu);
        riBao = (ImageView) view.findViewById(R.id.im_yinyon_ribao);
        zhonBao = (ImageView) view.findViewById(R.id.im_yinyon_zhonbao);
        yuBao = (ImageView) view.findViewById(R.id.im_yinyon_yubao);
        riZhiGuanLi = (ImageView) view.findViewById(R.id.im_yinyon_rizhiguanli);
        wuPinLingQu = (ImageView) view.findViewById(R.id.im_yinyon_wupinglinqu);

        daKa.setOnClickListener(this);
        qinJia.setOnClickListener(this);
        chuChai.setOnClickListener(this);
        waiChu.setOnClickListener(this);
        riBao.setOnClickListener(this);
        zhonBao.setOnClickListener(this);
        yuBao.setOnClickListener(this);
        riZhiGuanLi.setOnClickListener(this);
        wuPinLingQu.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){
            case R.id.im_yinyon_daka:
                Intent intent = new Intent(getActivity(), DakaActivity.class);
                startActivity(intent);
                break;
            case R.id.im_yinyon_qinjia:
                Intent intent11 = new Intent(getActivity(), QinJiaActivity.class);
                startActivity(intent11);
                break;
        }

    }
}
